<%@page import="java.util.List"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="admin.data.DealData"%>
<%@page import="models.StoreItemModel"%>
<%@page import="admin.data.StoreData"%>
<%@page import="models.StoreModel"%>
<%@page import="java.util.TreeMap"%>
<%
	StoreData storeData = new StoreData();
	List<StoreModel> listStore = storeData.getListStore();
	StoreItemModel storeItemModel = (StoreItemModel) request.getAttribute("storeItemModel");
%>
<jsp:include page="/admin/layouts/header.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>
<script type="text/javascript" src="/admin/js/form_store_item.js"></script>

		<div class="maincontent noright">
        	<div class="maincontentinner">
                <ul class="maintabmenu multipletabmenu">
                	<li><a href="/admin/store-item/list/">Quản lý kho</a></li>
                	<li class="current"><a href="javascript: return false;">Xuất kho</a></li>
                </ul><!--maintabmenu-->
                
                <div class="content">
                    <div class="contenttitle">
                    	<h2 class="form"><span>Xuất kho</span></h2>
                    </div><!--contenttitle-->
                    <form method="post" action="/admin/store-item/edit/" class="stdform stdform2" id="edit_store_item_form">	                                             
                        <p>
                        	<label>Tên kho hàng</label>
                            <span class="field">
                            	<select id="storeId" name="storeId" class="smallinput">
                            		<% for(int i=0;i<listStore.size();i++) { %>
                            			<option value="<%=listStore.get(i).getStoreId() %>"><%=listStore.get(i).getName() %></option>                            			
                            		<% } %>
								</select>							
                            </span>
                        </p> 
                        <p>
                        	<label>Tên Deal</label>
                            <span class="field">
                            	<input id="dealName" name="dealName" class="smallinput" value="<%=storeItemModel.getDealName()%>" readonly="readonly">
  	                         </span>
                        </p> 
                        <p>
                        	<label>Loại sản phẩm</label>
                            <span class="field">	                            
                            	<select id="type" name="type" class="smallinput">
                            		<% if(storeItemModel.getType()==0){ %>
                            			<option value="0" selected="selected">VC</option>                          			
                            		<% } else { %>
                            			<option value="1" selected="selected">SP</option>                         			
                            		<% } %>                           			
								</select>
                            </span>                            
                        </p> 
                        <p>
                        	<label>Tên sản phẩm</label>
                            <span class="field">
                            	<select id="productId" name="productId" class="smallinput">
                            		<option value="<%=storeItemModel.getProductId() %>" selected="selected"><%=storeItemModel.getProductName() %></option>                            			
								</select>				
                            </span>
                        </p>                      
                        <p>
                        	<label>Số lượng hàng tồn kho</label>
                            <span class="field">
                            	<input type="text" class="smallinput" name="inventory" id="inventory" value="<%=storeItemModel.getInventory() %>" readonly="readonly">
                            </span>
                        </p>  
                        <p>
                        	<label>Số lượng hàng xuất</label>
                            <span class="field">
                            	<input type="text" class="smallinput" name="amount" id="amount">
                            </span>
                        </p>              
                        <p class="stdformbutton">
                        	<button class="submit radius2">Submit</button>
                            <input type="reset" value="Reset Button" class="reset radius2">
                        </p>                        
                    </form>                                           
                    <br clear="all">
                    
                </div><!--content-->
                
            </div><!--maincontentinner-->
            
            <jsp:include page="/admin/elements/copyright.jsp">
            	<jsp:param name="language" value="1" />
			</jsp:include>
            
        </div>

<jsp:include page="/admin/layouts/footer.jsp">
    <jsp:param name="language" value="1" />
</jsp:include>